//
//  ZYAPIClient.m
//  YiLin
//
//  Created by Zyark on 2018/9/13.
//  Copyright © 2018年 Zyark. All rights reserved.
//

#import "ZYAPIClient.h"

@implementation ZYAPIClient
+(ZYAPIClient *)sharedClient
{
    static ZYAPIClient *_sharedClient = nil;
    static dispatch_once_t onceToken;
    
    dispatch_once(&onceToken, ^{
        NSURLSessionConfiguration *sessionConfiguration = [NSURLSessionConfiguration defaultSessionConfiguration];
        
        // Initialize Session Manager
        _sharedClient = [[ZYAPIClient alloc] initWithSessionConfiguration:sessionConfiguration];
        // Configure Manager
        [_sharedClient setResponseSerializer:[AFHTTPResponseSerializer serializer]];
        
    });
    
    return _sharedClient;
}
@end
